import App from './App'
import {i18n,getLang} from './locale/index'
import navBarCustom from './components/common/navBarCustom.vue'
import store from './store'
import { globalMixin } from './mixin'


// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  i18n,
  store,
  ...App
})
app.mixin(globalMixin)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  app.use(i18n)
  app.use(store)
  app.config.globalProperties.$getLang = getLang
  app.component('nav-bar-custom',navBarCustom)
  app.mixin(globalMixin)
  return {
    app
  }
}
// #endif
